package org.youyun56.gpsserver.common;

import net.sf.json.JSONObject;

public class JSONUtils {

    public static JSONObject success() {
        JSONObject o = new JSONObject();
        o.put("success", true);
        return o;
    }

    public static JSONObject test() {
        JSONObject o = new JSONObject();
        o.put("test", "");
        return o;
    }

    public static JSONObject failure(String error) {
        JSONObject o = new JSONObject();
        o.put("success", false);
        o.put("msgs", error);
        return o;
    }

    public static JSONObject success(String string) {
        JSONObject o = new JSONObject();
        o.put("success", true);
        o.put("msg", string);
        return o;
    }

}
